package com.lwl.entity;

import java.io.Serializable;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Table(name = "t_menu")
@Data
//@ApiModel(value = "TMenu)", description = "")
public class TMenu implements Serializable {
 private static final long serialVersionUID = -51984832329820407L;
 /**
 * 菜单的id
 */
 @Id
@Column(name = "id")
private Integer id;
@Column(name = "mname")
//@ApiModelProperty(value = "${column.comment}")
private String mname;
@Column(name = "pid")
//@ApiModelProperty(value = "菜单等级：0代表一级菜单")
private Integer pid;
@Column(name = "url")
//@ApiModelProperty(value = "给菜单指明一个跳转的路径")
private String url;
@Column(name = "icon")
//@ApiModelProperty(value = "图标")
private String icon;

//父菜单对子菜单是一对多的关系，在一的里面写上多的一方需要用数组
 @Transient//在进行单表查询时忽略此列
 private List<TMenu> sonMenus = new ArrayList<>();
}
